package ZiXi;

import java.util.ArrayList;

public class textStudent {
    public static void main(String[] args) {
        ArrayList<Student> list=new ArrayList<>();
        Student stu1=new Student("石破天",45,78);
        Student stu2=new Student("李寻欢",85,78);
        Student stu3=new Student("傅红雪",40,98);
        list.add(stu1);
        list.add(stu2);
        list.add(stu3);
        ArrayList list1=new ArrayList();
        for (int i = 0; i < list.size(); i++) {
            Student stu=list.get(i);
            if((stu.getShu()+stu.getYu())>160){
                list1.add(stu);
                System.out.println(stu.getName()+stu.getShu()+stu.getYu());
            }
        }

    }
}
